Range

Function

This API is used to get parameter range for Record > Record Schedule page.

Note:

The Range provides reference information for client UI input limits and API request limits. When sending Get and Set requests, the parameters must be strictly limited according to the Range, otherwise the request may be rejected by the device.

Request Message

None.

Sample:

POST /API/Schedules/Record/Range HTTP/1.1
{
    "version": "1.0",
    "data": {}
}

Response Message

Parameter Description

Table 1

ParameterRangeTypeDescription
channel_infoJSON ObjectJSON show as follow Table 2.
channel_maxintMaximum number of channels.
support_copyboolIndicate whether the current page supports copying parameters.(NVR, DVR dedicated)

Table 2

ParameterRangeTypeDescription
CH1Json ObjectJSON show as follow Table 3.
IP_CH1Json Object
WIFI_CH1Json Object

Table 3

ParameterRangeTypeDescription
copy_ch"digit", "analog", "wifi", "local", "all"stringThe type of channel that supports copying parameters. (NVR, DVR dedicated)
categoryarrayJSON show as follow Table 4.

Table 4

ParameterRangeTypeDescription
schedule_type"Normal", "Motion", "Io", "Pir"stringSupported schedule types.
weekarray of JSON objectsJSON show as follow Table 5.

Table 5

ParameterRangeTypeDescription
day"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"string
time0, 1array0:Disable recording
1:Enable recording. Each element in the array represents the recording switch for this half-hour period.

Tips:

The response message of the Range request may not contain all the fields in the above table, and the fields not included indicate that the device does not support this parameter configuration.

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "channel_max": 8,
        "support_copy": true,
        "channel_info": {
            "type": "object",
            "items": {
                "CH1": {
                    "type": "object",
                    "items": {
                        "category": {
                            "type": "array",
                            "min_size": 0,
                            "max_size": 22,
                            "items": [{
                                "schedule_type": {
                                    "type": "string",
                                    "items": [
                                        "Normal",
                                        "Motion",
                                        "Io"
                                    ]
                                },
                                "disable_type": {
                                    "type": "string",
                                    "items": ["Exception"]
                                },
                                "week": {
                                    "type": "array",
                                    "size": 7,
                                    "items": [{
                                        "day": {
                                            "type": "string",
                                            "items": [
                                                "Sun",
                                                "Mon",
                                                "Tue",
                                                "Wed",
                                                "Thu",
                                                "Fri",
                                                "Sat"
                                            ]
                                        },
                                        "time": {
                                            "type": "array",
                                            "size": 48,
                                            "items": [{
                                                "type": "int32",
                                                "items": [
                                                    0,
                                                    1
                                                ]
                                            }]
                                        }
                                    }]
                                }
                            }]
                        },
                        "copy_ch": {
                            "type": "string",
                            "items": [
                                "digit",
                                "analog",
                                "wifi",
                                "local",
                                "all"
                            ]
                        }
                    }
                },
                "CH2": {
                    "type": "object",
                    "items": {
                        "category": {
                            "type": "array",
                            "min_size": 0,
                            "max_size": 22,
                            "items": [{
                                "schedule_type": {
                                    "type": "string",
                                    "items": [
                                        "Normal",
                                        "Motion",
                                        "Io"
                                    ]
                                },
                                "disable_type": {
                                    "type": "string",
                                    "items": ["Exception"]
                                },
                                "week": {
                                    "type": "array",
                                    "size": 7,
                                    "items": [{
                                        "day": {
                                            "type": "string",
                                            "items": [
                                                "Sun",
                                                "Mon",
                                                "Tue",
                                                "Wed",
                                                "Thu",
                                                "Fri",
                                                "Sat"
                                            ]
                                        },
                                        "time": {
                                            "type": "array",
                                            "size": 48,
                                            "items": [{
                                                "type": "int32",
                                                "items": [
                                                    0,
                                                    1
                                                ]
                                            }]
                                        }
                                    }]
                                }
                            }]
                        },
                        "copy_ch": {
                            "type": "string",
                            "items": [
                                "digit",
                                "analog",
                                "wifi",
                                "local",
                                "all"
                            ]
                        }
                    }
                },
                "CH3": {
                    "type": "object",
                    "items": {
                        "category": {
                            "type": "array",
                            "min_size": 0,
                            "max_size": 22,
                            "items": [{
                                "schedule_type": {
                                    "type": "string",
                                    "items": [
                                        "Normal",
                                        "Motion",
                                        "Io"
                                    ]
                                },
                                "disable_type": {
                                    "type": "string",
                                    "items": ["Exception"]
                                },
                                "week": {
                                    "type": "array",
                                    "size": 7,
                                    "items": [{
                                        "day": {
                                            "type": "string",
                                            "items": [
                                                "Sun",
                                                "Mon",
                                                "Tue",
                                                "Wed",
                                                "Thu",
                                                "Fri",
                                                "Sat"
                                            ]
                                        },
                                        "time": {
                                            "type": "array",
                                            "size": 48,
                                            "items": [{
                                                "type": "int32",
                                                "items": [
                                                    0,
                                                    1
                                                ]
                                            }]
                                        }
                                    }]
                                }
                            }]
                        },
                        "copy_ch": {
                            "type": "string",
                            "items": [
                                "digit",
                                "analog",
                                "wifi",
                                "local",
                                "all"
                            ]
                        }
                    }
                },
                "CH4": {
                    "type": "object",
                    "items": {
                        "category": {
                            "type": "array",
                            "min_size": 0,
                            "max_size": 22,
                            "items": [{
                                "schedule_type": {
                                    "type": "string",
                                    "items": [
                                        "Normal",
                                        "Motion",
                                        "Io"
                                    ]
                                },
                                "disable_type": {
                                    "type": "string",
                                    "items": ["Exception"]
                                },
                                "week": {
                                    "type": "array",
                                    "size": 7,
                                    "items": [{
                                        "day": {
                                            "type": "string",
                                            "items": [
                                                "Sun",
                                                "Mon",
                                                "Tue",
                                                "Wed",
                                                "Thu",
                                                "Fri",
                                                "Sat"
                                            ]
                                        },
                                        "time": {
                                            "type": "array",
                                            "size": 48,
                                            "items": [{
                                                "type": "int32",
                                                "items": [
                                                    0,
                                                    1
                                                ]
                                            }]
                                        }
                                    }]
                                }
                            }]
                        },
                        "copy_ch": {
                            "type": "string",
                            "items": [
                                "digit",
                                "analog",
                                "wifi",
                                "local",
                                "all"
                            ]
                        }
                    }
                },
                "CH5": {
                    "type": "object",
                    "items": {
                        "category": {
                            "type": "array",
                            "min_size": 0,
                            "max_size": 22,
                            "items": [{
                                "schedule_type": {
                                    "type": "string",
                                    "items": [
                                        "Normal",
                                        "Motion",
                                        "Io"
                                    ]
                                },
                                "disable_type": {
                                    "type": "string",
                                    "items": ["Exception"]
                                },
                                "week": {
                                    "type": "array",
                                    "size": 7,
                                    "items": [{
                                        "day": {
                                            "type": "string",
                                            "items": [
                                                "Sun",
                                                "Mon",
                                                "Tue",
                                                "Wed",
                                                "Thu",
                                                "Fri",
                                                "Sat"
                                            ]
                                        },
                                        "time": {
                                            "type": "array",
                                            "size": 48,
                                            "items": [{
                                                "type": "int32",
                                                "items": [
                                                    0,
                                                    1
                                                ]
                                            }]
                                        }
                                    }]
                                }
                            }]
                        },
                        "copy_ch": {
                            "type": "string",
                            "items": [
                                "digit",
                                "analog",
                                "wifi",
                                "local",
                                "all"
                            ]
                        }
                    }
                },
                "CH6": {
                    "type": "object",
                    "items": {
                        "category": {
                            "type": "array",
                            "min_size": 0,
                            "max_size": 22,
                            "items": [{
                                "schedule_type": {
                                    "type": "string",
                                    "items": [
                                        "Normal",
                                        "Motion",
                                        "Io"
                                    ]
                                },
                                "disable_type": {
                                    "type": "string",
                                    "items": ["Exception"]
                                },
                                "week": {
                                    "type": "array",
                                    "size": 7,
                                    "items": [{
                                        "day": {
                                            "type": "string",
                                            "items": [
                                                "Sun",
                                                "Mon",
                                                "Tue",
                                                "Wed",
                                                "Thu",
                                                "Fri",
                                                "Sat"
                                            ]
                                        },
                                        "time": {
                                            "type": "array",
                                            "size": 48,
                                            "items": [{
                                                "type": "int32",
                                                "items": [
                                                    0,
                                                    1
                                                ]
                                            }]
                                        }
                                    }]
                                }
                            }]
                        },
                        "copy_ch": {
                            "type": "string",
                            "items": [
                                "digit",
                                "analog",
                                "wifi",
                                "local",
                                "all"
                            ]
                        }
                    }
                },
                "CH7": {
                    "type": "object",
                    "items": {
                        "category": {
                            "type": "array",
                            "min_size": 0,
                            "max_size": 22,
                            "items": [{
                                "schedule_type": {
                                    "type": "string",
                                    "items": [
                                        "Normal",
                                        "Motion",
                                        "Io"
                                    ]
                                },
                                "disable_type": {
                                    "type": "string",
                                    "items": ["Exception"]
                                },
                                "week": {
                                    "type": "array",
                                    "size": 7,
                                    "items": [{
                                        "day": {
                                            "type": "string",
                                            "items": [
                                                "Sun",
                                                "Mon",
                                                "Tue",
                                                "Wed",
                                                "Thu",
                                                "Fri",
                                                "Sat"
                                            ]
                                        },
                                        "time": {
                                            "type": "array",
                                            "size": 48,
                                            "items": [{
                                                "type": "int32",
                                                "items": [
                                                    0,
                                                    1
                                                ]
                                            }]
                                        }
                                    }]
                                }
                            }]
                        },
                        "copy_ch": {
                            "type": "string",
                            "items": [
                                "digit",
                                "analog",
                                "wifi",
                                "local",
                                "all"
                            ]
                        }
                    }
                },
                "CH8": {
                    "type": "object",
                    "items": {
                        "category": {
                            "type": "array",
                            "min_size": 0,
                            "max_size": 22,
                            "items": [{
                                "schedule_type": {
                                    "type": "string",
                                    "items": [
                                        "Normal",
                                        "Motion",
                                        "Io"
                                    ]
                                },
                                "disable_type": {
                                    "type": "string",
                                    "items": ["Exception"]
                                },
                                "week": {
                                    "type": "array",
                                    "size": 7,
                                    "items": [{
                                        "day": {
                                            "type": "string",
                                            "items": [
                                                "Sun",
                                                "Mon",
                                                "Tue",
                                                "Wed",
                                                "Thu",
                                                "Fri",
                                                "Sat"
                                            ]
                                        },
                                        "time": {
                                            "type": "array",
                                            "size": 48,
                                            "items": [{
                                                "type": "int32",
                                                "items": [
                                                    0,
                                                    1
                                                ]
                                            }]
                                        }
                                    }]
                                }
                            }]
                        },
                        "copy_ch": {
                            "type": "string",
                            "items": [
                                "digit",
                                "analog",
                                "wifi",
                                "local",
                                "all"
                            ]
                        }
                    }
                }
            }
        }
    }
}

Error Code

See Response Messages Body and Common error_code for more information.